package com.xxx;

import org.junit.Test;

import java.util.function.Consumer;

public class LambdaTest {
    @Test
    public void test1(){
        Consumer consumer=x-> System.out.println(x);
        consumer.accept("Hello Lambda!!!");
    }


    @Test
    public void test2(){
        Integer num = operation(100, x -> x + x);
        System.out.println(num);
    }

    public Integer operation(Integer num,MyFun mf){
        return mf.getValue(num);
    }
}
